package com.zpark.oop.day01;

public class Demo03 {
    public static void main(String[] args) {
        // 创建zs对象
        Person zs = new Person();
        // 声明dc对象，然后将zs赋值给dc
        Person dc = zs;

        System.out.println(zs.name);
        System.out.println(dc.name);

        System.out.println("*******************************");
        // 通过zs给name属性赋值
        zs.name = "张三";
        System.out.println(zs.name);
        System.out.println(dc.name);

        System.out.println("***********************");
        dc.name = "大锤";
        System.out.println(zs.name);
        System.out.println(dc.name);
    }
}
